function [lb, ub, dim, fobj] = GetFunctionDetails_T1(I,pMax,pMin,gArray,n0,gArray_EV)
fobj = @F_T1;
lb = pMin;
ub = pMax;
dim = I;
function objf = F_T1(P)
    diagGArray = reshape(diag(gArray),1,I);
    % Data Rate
    SINR = P.*diagGArray./(n0 + P*gArray' - P.*diagGArray);
    R = log(1 + SINR);
    % Wiredtapped Data Rate
    SINR_EV = P.*gArray_EV./(n0 + P*gArray_EV' - P.*gArray_EV);
    Gamma = log(1 + SINR_EV);
    % Secrecy Data Rate
    Phi = R - Gamma;
    % objective function (Max-Min --> Min-Max)
    % unconstrained problem --> no penalty factor
    objf = max(-Phi);
end
end